package com.ums.upos.util;

import com.nexgo.oaf.apiv3.device.reader.CardSlotTypeEnum;
import com.nexgo.oaf.apiv3.device.reader.CardTypeEnum;
import com.ums.upos.uapi.device.reader.icc.IccCardType;
import com.ums.upos.uapi.device.reader.icc.IccReaderSlot;

/**
 * Created by xiaox on 16/9/19.
 */
public class CardUtils {
    public static CardSlotTypeEnum slotConvert(int slotNo) {
        CardSlotTypeEnum cardSlotTypeEnum;
        switch (slotNo) {
            case IccReaderSlot.ICSlOT1:
                cardSlotTypeEnum = CardSlotTypeEnum.ICC1;
                break;
            case IccReaderSlot.ICSlOT2:
                cardSlotTypeEnum = CardSlotTypeEnum.ICC2;
                break;
            case IccReaderSlot.ICSlOT3:
                cardSlotTypeEnum = CardSlotTypeEnum.ICC3;
                break;
            case IccReaderSlot.PSAMSlOT1:
                cardSlotTypeEnum = CardSlotTypeEnum.PSAM1;
                break;
            case IccReaderSlot.PSAMSlOT2:
                cardSlotTypeEnum = CardSlotTypeEnum.PSAM2;
                break;
            case IccReaderSlot.PSAMSlOT3:
                cardSlotTypeEnum = CardSlotTypeEnum.PSAM3;
                break;
            case IccReaderSlot.RFSlOT:
                cardSlotTypeEnum = CardSlotTypeEnum.RF;
                break;
            default:
                cardSlotTypeEnum = CardSlotTypeEnum.ICC1;
                break;
        }
        return cardSlotTypeEnum;
    }
}
